Added get_record method.
authorEwan Mellor <ewan@xensource.com>
Mon, 25 Dec 2006 14:59:11 +0000 (14:59 +0000)
committerEwan Mellor <ewan@xensource.com>
Mon, 25 Dec 2006 14:59:11 +0000 (14:59 +0000)
By Alastair Tse <atse@xensource.com>.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
tools/python/xen/xend/XendVDI.py

index 22a1616360a04cbd8f91a01006f262c5e8e4b3c9..205aa0a091175c601ccd2d870b53c49768992932 100644 (file)
@@ -141,6 +141,21 @@ class XendVDI(AutoSaveObject):
 
         return True
 
+    def get_record(self):
+        return {'uuid': self.uuid,
+                'name_label': self.name_label,
+                'name_description': self.name_description,
+                'virtual_size': self.virtual_size,
+                'physical_utilisation': self.physical_utilisation,
+                'sector_size': self.sector_size,
+                'parent': None,
+                'children': [],
+                'sharable': False,
+                'readonly': False,
+                'SR': self.sr.get_uuid(),
+                'VBDs': []}
+                
+
 class XendQCOWVDI(XendVDI):
 
     def __init__(self, uuid, sr_uuid, qcow_path, cfg_path, vsize, psize):